﻿@model CloudFranceTriple.Models.PrivateMessageBoxSet

@{
    ViewBag.Title = CloudFranceTriple.WebRole.Properties.Resources.PrivateMessageCreateTitle;
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="content-padding">
    <h1>@CloudFranceTriple.WebRole.Properties.Resources.PrivateMessageCreateTitle</h1>
    <section>
        @using (Html.BeginForm())
        {
            @Html.AntiForgeryToken()
            @Html.ValidationSummary(true)

            <fieldset>
                <legend>@CloudFranceTriple.WebRole.Properties.Resources.PrivateMessageCreateTitle</legend>

                <input type="hidden" id="ParentId" name="ParentId" value="@ViewBag.ParentId" />

                @if (ViewBag.OriginalPrivateMessage != null)
                {
                    <div class="editor-label" style="border: 1px solid #fffffe; border-radius: 8px; padding: 4px;">
                        <h3>@CloudFranceTriple.WebRole.Properties.Resources.PrivateMessageOriginal:</h3>
                        @Html.Raw(ViewBag.OriginalPrivateMessage)
                    </div>
                }

                <div class="editor-label">
                    @CloudFranceTriple.WebRole.Properties.Resources.PrivateMessageTo
                </div>
                <div class="editor-field">
                    @Html.DropDownList("ToPrivateMessage", String.Empty)
                    @Html.ValidationMessageFor(model => model.ToPrivateMessage)
                </div>

                <div class="editor-label">
                    @CloudFranceTriple.WebRole.Properties.Resources.PrivateMessageSubject
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.MessageBody_Label)
                    @Html.ValidationMessageFor(model => model.MessageBody_Label)
                </div>

                <div class="editor-label">
                    @CloudFranceTriple.WebRole.Properties.Resources.PrivateMessageBody
                </div>
                <div class="editor-field">
                    <textarea id="MessageBody_Message" name="MessageBody_Message">
                        @Html.DisplayTextFor(model => model.MessageBody_Message)
                    </textarea>
                    @Html.ValidationMessageFor(model => model.MessageBody_Message)
                </div>
                <p>
                    <input type="submit" value="@CloudFranceTriple.WebRole.Properties.Resources.ButtonSend" />
                </p>
            </fieldset>
        }
        @Html.Partial("_PrivateMessageBackToList")
    </section>
</div>
<script type="text/javascript" src="http://tinymce.cachefly.net/4.0/tinymce.min.js"></script>
<script type="text/javascript">tinymce.init({
    selector: "textarea#MessageBody_Message",
    theme: "modern",
    plugins: ["autolink link image charmap print preview emoticons media textcolor searchreplace wordcount code contextmenu paste"],
    toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
    toolbar2: "print preview media | forecolor backcolor emoticons",
});</script>
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
